<?
require_once('audition/base.php');

$pt = new PageTemplate;
$pt->file = "releases.php";
$pt->display();

?>

<?

/*
require_once('audition/base.php');
$css = "releases";
$activeItem = "releases";
include_class('releases');
include_class('m2');
include_class('band_members');
include_class('band_gps');
include_class('release_tracks');
$pageTitle = "Oliver :: Releases";
$releaseDetail = ($_GET['id']) ? true : false;
$rl = new ReleaseList;
$result = $rl->get_releases();
$ln = new Template;
if ($releaseDetail) {	
	$br = Release::get($_GET['id']); 
	$ln->file = "release_detail.php";	
	$ln2 = new Template;
	$ln2->file = "release_cover.php";
} else {
	$resultCol1 = array();
	$resultCol2 = array();
	$i = 0;
	foreach($result as $r) {
		if (intval($i/2) == ($i/2)) {
			$resultCol1[] = $r;
		} else {
			$resultCol2[] = $r;
		}
		$i++;
	}	
	$ln->file = "release_summary.php";
}

$mediaDetail = false;
if ($_GET['media_instance_id'] > 0) { 
	$mi = MediaInstance::get($_GET['media_instance_id']);
	if (is_object($mi)) {
		if (($mi->getAreaID() == $br->getAVAreaID() || $mi->getAreaID() == $br->getPhotoAreaID()) && $mi->isActive()) {
			$mediaDetail = true;
		}
	}
}
include('layout/header.php');
include('layout/nav.php');

if ($releaseDetail) { ?>

<div class="browser-wrapper">
<div class="browser">
<?
	foreach ($result as $no) {
		$ln2->args['activeID'] = $br->getID();
		$ln2->args['releaseObject'] = $no;
		$ln2->display();
	} 
?>

</div>
</div>

<div class="main">
<? if ($mediaDetail) {
	$mt = new Template;
	$mt->file = "media_detail.php";
	$mt->args['mi'] = $mi;
	$mt->args['exitURL'] = '/release/' . $br->getID() . '/';
	$mt->display();
} else { ?>
	<div class="release-detail"><? $ln->args['releaseObject'] = $br; $ln->display(); ?></div>
<? } ?>
</div>

<? } else { ?>
<div><h2>Releases</h2></div>
<div class="main">
<div class="column-one">
<?
	foreach ($resultCol1 as $no) {
		$ln->args['releaseObject'] = $no; $ln->display();
	} 
?>
</div>
<div class="column-two">
<?
	foreach ($resultCol2 as $no) {
		$ln->args['releaseObject'] = $no; $ln->display();
	} 
?>
</div>
</div>
<? } ?>


<? include('layout/footer.php'); */?>